package protocol.print;

import java.io.DataOutputStream;
import java.io.IOException;

public class PrintRequest {

	private int m_ID;
	private int m_IDprinter;
	private byte[] m_doc;
	
	public PrintRequest(int ID, int IDprinter, byte[] doc)
	{
		m_ID = ID;
		m_IDprinter = IDprinter;
		m_doc = doc;
	}
	
	public DataOutputStream write(DataOutputStream dos) throws IOException
	{
		dos.writeInt(m_ID);
		dos.writeInt(m_IDprinter);
		dos.writeInt(m_doc.length);
		dos.write(m_doc);
		
		return dos;
	}
}
